﻿#pragma once
#include<stdio.h>
#include<stdlib.h>

//二叉树节点结构的定义
typedef  char BTDateType;
typedef struct BinaryTreeNode
{
	BTDateType date;
	struct BinaryTreeNode* left;
	struct BinaryTreeNode* right;
}BTNode;


//前序遍历
void PreOrder(BTNode* root);

//中序遍历
void InOrder(BTNode* root);

//后序遍历
void PostOrder(BTNode* root);

//二叉树节点个数
int BinaryTreeSize(BTNode* root);

// ⼆叉树叶⼦结点个数
int BinaryTreeLeafSize(BTNode* root);

//二叉树第K层节点个数
int BinaryTreeLeveLkSize(BTNode* root,int k);

//二叉树的深度/高度
int BinaryTreeDepth(BTNode* root);

//二叉树查找值为x的节点
BTNode* BinaryTreeFind(BTNode* root, BTDateType x);

//二叉树的销毁
void BinaryDestroy(BTNode** root);

//二叉树的层序遍历
void LeveIOrder(BTNode* root);

